<?php


namespace App\Modules\Admin\Entities\Seller;


use App\Models\Model;
use App\Modules\Seller\Entities\Rabc\SellerAdmin;

class SellerModel extends Model
{

    protected $table = 'sellers';
    protected $primaryKey = 'seller_id';
    protected $is_delete = 0; //是否开启删除（1.开启删除，就是直接删除；0.假删除）
    protected $delete_field = 'is_delete'; //删除字段

    /**
     * 是否主动维护时间戳
     *
     * @var bool
     */
    public $timestamps = false;

    protected $hidden = ['password'];


    public function sellerAdmin()
    {
        return $this->hasOne(SellerAdmin::class, $this->primaryKey, $this->primaryKey);
    }
    public function getSelectLists(){
        $first = ['seller_id','seller_name','seller_nickname'];
        return $this->get($first)->toArray();
    }

}